<h3>参考文档</h3>
<a href="http://blog.csdn.net/numbibi/article/details/7783630" target="_blank">artDialog-v4介绍</a>


<h3>将父框架中的对象传递给子页面窗口中</h3>
art.dialog.data("key",value);



<br>
<h3>例子1 附件上传</h3>
<br>
<bold> 父窗口 app/common/upload/attachment.ftl  </bold>
<br>

<textarea cols=100 rows=10>
        /**
         * 附件控件事件
         */
        function attachWindow2(objId, objName) {
                var fvalue = objId + "," + objName;
                art.dialog.open(ctx + "common_upload_upload.do?fname=" + fvalue,{id:"attachementDialog",title:"上传附件",width:"600px",height:"400px"});
                art.dialog.data('parentWindow',window)
        }
</textarea>
<br>   
<bold>子窗口app/common/upload/upload.ftl </bold>
<br>
 <textarea cols=100 rows=20>   
    var fname="${fname?if_exists}";
    var fnameList = fname.split(",");
    var parentWindow =art.dialog.data('parentWindow');
    var documentObj = parentWindow.document;


    function btnOk(){
        var fvalue = "";
        var ftext = "";
        fvalue     = $("#fildIds").val();
        ftext    = $("#fildNames").val();

        $(documentObj.getElementById(fnameList[0])).val(fvalue);
        $(documentObj.getElementById(fnameList[1])).val(ftext);
        parent.$(documentObj).find("#" + fnameList[0]).trigger("change");
        parent.$(documentObj).find("#" + fnameList[1]).trigger("change");
        art.dialog.close();
    }
</textarea> 

<br>
<h3>例子2 点击任务转交，弹出窗口</h3>
<br>
<bold>例如父窗口调用：</bold>
<br>
<textarea cols=100 rows=20>
            function doTransferTask(taskId,pid){
                var url = ctx+"/system/workflow/showBack.do?taskId="+taskId+"&processInstanceId="+pid;
                 parent.art.dialog.open(url,{
                               title :"任务转交",
                               width: 800, 
                               height: 480,
                               lock: true,
                               fixed: true,
                               drag: false,
                               resize: false,
                               close : function(){ 
                                    // alert(111);
                               }
                        }
                );
                 parent.art.dialog.data('parentWindow',window)
                 parent.art.dialog.data('taskId',taskId)
                 parent.art.dialog.data('processInstanceId',pid)
            }
</textarea>      

<br>
<bold>子窗口ajax提交:</bold>

<br>
<textarea cols=100 rows=20>
 function doSubmit(){
                 var taskId=art.dialog.data('taskId');
                 var processInstanceId=art.dialog.data('processInstanceId');
                 var url = cmdSubmitTransfer+"?taskId="+taskId+"&processInstanceId="+processInstanceId;

                    // 通过 form 的 id 取得 form
                    var $form = $('#contentForm'); // 很关键
                    // 得到 form 的提交路径
                    // 以 post 方式提交, 回调函数function 返回 data
                    var i = $.post(url, $form.serialize(), function(data){
                        // 显示返回信息
                        var result=eval('(' + data + ')');

                        if(result.status == 'success'){
                               parent.art.dialog.alert("回退成功");
                               art.dialog.data('parentWindow').goBackWorkflow();
                               art.dialog.close();
                        }else{
                                parent.art.dialog.alert(result.message);
                                 $("#btn-wf-back").attr('disabled',false);
                        }
                    });
}
</textarea> 

<br>   
<h3>例子3 <a href="ued/test/select_user.do" target="_blank">用户选择</a></h3>  
 
